<template>
    <div>
        <p v-bind:title="message">{{message}}</p>
        <p v-if="isP">这是一个p元素</p>
        <input v-model="message"/>
        <button v-on:click="click">点击</button>
    </div>
</template>

<script>
    let count = 1;
    export default {
        data () {
            return {
                'message': 'xiaodongio',
                'isP': true,
            }
        },
        updated: function(){
            console.log('updated');
        },
        methods: {
            click: function ()  {
                console.log(this);
                this.message = this.message.split('').reverse().join('')
                console.log('点击了'+ count++ +'次');
                this.isP = false;
            }
        }
    }
</script>
